{% extends "share/base.html" %}
{% load filters %}

{% block content %}

<table>
  <tr><td>Name:</td><td>{{ file.name }}</td></tr>
  <tr><td>Size:</td><td>{{ file.object.size }}</td></tr>
  <tr><td>Time:</td><td>{{ file.object.time|date:"Y-m-d H:m" }}</td></tr>
{% if file.is_regular %}
  <tr><td>Digest:</td><td>{{ file.object.digest }}</td></tr>
  <tr><td>Path:</td><td>{{ file.object.path }}</td></tr>
  <tr><td>Links:</td><td>{{ file.object.links }}</td></tr>
{% else %}
  <tr><td>Subdirs:</td><td>{{ file.object.subdirs|countsub }}</td></tr>
  <tr><td>Files:</td><td>{{ file.object.files|countsub }}</td></tr>
{% endif %}
  <tr><td>Share:</td><td>{{ file.shared_status }}</td></tr>
  <tr>
      <td>Operation:</td>
      <td class="operation2" colspan=2>
        <a href="{% url 'share:view' file.pk %}">view</a> |
        <a href="{% url 'share:download' file.pk %}">download</a>
      </td>
  </tr>
</table>
{% endblock %}
